package com.share.example.javafx;

import com.share.example.javafx.jacob.LibInit;
import com.share.example.javafx.screen.StartScreen;
import com.share.example.javafx.view.LoginView;
import de.felixroske.jfxsupport.AbstractJavaFxApplicationSupport;
import javafx.stage.Stage;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
@MapperScan("com.share.example.javafx.mapper")
public class AppJavaFx extends AbstractJavaFxApplicationSupport {
    //拷贝dll文件到java_home的bin目录下
    static {
        LibInit.init();
    }

    public static void main(String[] args) {
        launch(AppJavaFx.class, LoginView.class, new StartScreen(), args);
    }

    @Override
    public void beforeInitialView(Stage stage, ConfigurableApplicationContext ctx) {
        stage.setTitle("标题");
        stage.setWidth(400);
        stage.setHeight(400);
    }
}
